# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=luakit
pkgver=2.2
pkgrel=0
pkgdesc="Fast, small, webkit based browser framework extensible by Lua"
url="https://luakit.github.io/"
arch="all !mips !mips64 !s390x" #fixme install fails on s390x
license="GPL-3.0-or-later"
depends="gsettings-desktop-schemas lua5.1-filesystem"
makedepends="webkit2gtk-dev luajit-dev"
checkdepends="xvfb luacheck lua5.1-luassert"
options="!check" #fixme
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/luakit/luakit/archive/$pkgver.tar.gz
	config-mk.patch
	"

build() {
	make PREFIX=/usr USE_LUAJIT=1 DEVELOPMENT_PATHS=0
}

check() {
	make run-tests
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/share/doc/"$pkgname"
	mv "$pkgdir"/usr/share/"$pkgname"/doc/* "$pkgdir"/usr/share/doc/"$pkgname"
	rmdir "$pkgdir"/usr/share/"$pkgname"/doc
}

sha512sums="5364acc559c934593dd9d66f8f3238225a7f89a824780f406a0a616d89fc78db4ee98b2cfa161e43ffbdfb9c5ac915a63383f45b1b6bd4eda9c33d62eff2b06f  luakit-2.2.tar.gz
d852a17bf202b18e75bda3885e421a957ce501ebbeb0ecd6e7a6379747e350878c9f95683a0385ce9daa719ddd02a3e5d5143ebd9ee892a469d8457e7a863b5a  config-mk.patch"
